<template>
  <div id="app">
    <!-- <img src="./assets/logo.png"> -->
    <router-view/>

    <splash v-if="isShow"></splash>
  </div>
</template>

<script>
import splash from './view/user/login/splash.vue'

var calcRem = function (doc, win) {
    var docEl = doc.documentElement,
        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
        recalc = function () {
            var clientWidth = docEl.clientWidth;
            if (!clientWidth) return;
            if(clientWidth>750){
              clientWidth = 750;
            }
            docEl.style.fontSize =100* (clientWidth / 375) + 'px';
        };
    if (!doc.addEventListener) return;
    win.addEventListener(resizeEvt, recalc, false);
    doc.addEventListener('DOMContentLoaded', recalc, false);
}
calcRem(document, window);


export default {
  name: 'App',
  components:{
    splash
  },
  data(){
    return{
      isShow:true,
    }
  },
  mounted(){
    //启动页显示时长 暂定300
   setTimeout(this.hideSplash,1000)

  },
  methods:{
    hideSplash(){
      this.isShow = false;
    }
  }
}
</script>

<style>
  #app{
    height: 100%;
  }
</style>
